package com.cc.crm.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @program:
 * @ClassName:
 * @description:
 * @author: zgc
 * @date:
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Customer {
    private Integer id;
    @NotNull(message = "客户名称不能为空")
    @Pattern(regexp = "^[\u4e00-\u9fa5]{2,5}$",message = "姓名格式不正确，应该是3-5个中文字符")
    private String name;
    @NotNull(message = "客户地址不能为空")
    @Pattern(regexp = "^[\u4e00-\u9fa5]{1,30}$",message = "地址格式不正确，地址格式应该为5-30个中文汉字")
    private String address;
    @NotNull(message = "客户联系人不能为空")
    @Pattern(regexp = "^[\u4e00-\u9fa5]{2,5}$",message = "客户联系人格式不正确，应该是3-5个中文字符")
    private String contact;
    @NotNull(message = "客户联系方式不能为空")
    @Pattern(regexp = "^[0-9]{11}$",message = "客户联系方式格式不正确，应该为11位数字")
    private String tel;
    @NotNull(message = "客户邮箱不能为空")
    private String email;
    private Integer userid;
    private String username;
    private Integer isdelete;
}
